import com.smbms.controller.HelloController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * 消费端启动类
 */
public class CustomerApplication {

    public static void main(String[] args) throws IOException {

        //启动spring
       ApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("dubbo-A,服务消费者启动完成");

       //获取HelloController
        HelloController helloController = (HelloController) applicationContext.getBean("helloController");

        helloController.show();

        //等待控制台输入,避免程序提前结束
        System.in.read();

    }
}
